extends Node

const CONFIG_PATH = "user://settings.ini"
const SECTION_BACKGROND = "Background"
const SECTION_ROLLING_TEXT = "RollingText"

var config: ConfigFile

func _enter_tree() -> void:
	config = ConfigFile.new()
	config.load(CONFIG_PATH)


func _notification(what: int) -> void:
	if what == NOTIFICATION_APPLICATION_PAUSED or what == NOTIFICATION_WM_WINDOW_FOCUS_OUT:
		config.save(CONFIG_PATH)


func _exit_tree() -> void:
	config.save(CONFIG_PATH)
